package com.we.risk.sa;

public class SaEventCodeProcess {
    public static final String[] EDUCODES = {
        "ma_varnum_education_code01",
        "ma_varnum_education_code02",
        "ma_varnum_education_code03",
        "ma_varnum_education_code04",
        "ma_varnum_education_code05",
        "ma_varnum_education_code06",
        "ma_varnum_education_code07",
        "ma_varnum_education_code08"
    };

    //    public static void eduCodeProcess(String opContent, JSONObject resJson) {
    //        String eduCode = getEduCode(opContent);
    //        for (String element: EDUCODES) {
    //            if(eduCode.equals(element)) {
    //                resJson.put(element,1);
    //            } else {
    //                Integer value = resJson.getInteger(element);
    //                resJson.put()
    //            }
    //        }
    //    }

    public static String getEduCode(String input) {
        String code = null;
        input = (input == null ? "null" : input);
        switch (input) {
            case "大学专科和专科学校":
                code = "ma_varnum_education_code01";
                break;
            case "初中":
                code = "ma_varnum_education_code02";
                break;
            case "技术学校":
                code = "ma_varnum_education_code03";
                break;
            case "中等专业学校或中等技术学校":
                code = "ma_varnum_education_code04";
                break;
            case "高中":
                code = "ma_varnum_education_code05";
                break;
            case "研究生":
                code = "ma_varnum_education_code06";
                break;
            case "大学本科":
                code = "ma_varnum_education_code07";
                break;
            case "小学":
                code = "ma_varnum_education_code08";
                break;
            default:
                code = "ma_varnum_education_code00";
                break;
        }

        return code;
    }

    public static String getIdstryCode(String input) {
        String code = null;
        input = (input == null ? "null" : input);
        switch (input) {
            case "服务业":
                code = "ma_varnum_has_industry_code01";
                break;
            case "制造业":
                code = "ma_varnum_has_industry_code02";
                break;
            case "建筑工程业":
                code = "ma_varnum_has_industry_code03";
                break;
            case "商业":
                code = "ma_varnum_has_industry_code04";
                break;
            case "农、林、牧、渔、水利业及其他":
                code = "ma_varnum_has_industry_code05";
                break;
            case "通信、电子、互联网行业":
                code = "ma_varnum_has_industry_code06";
                break;
            case "交通运输业":
                code = "ma_varnum_has_industry_code07";
                break;
            case "餐旅业":
                code = "ma_varnum_has_industry_code08";
                break;
            case "政府、非盈利机构":
                code = "ma_varnum_has_industry_code09";
                break;
            case "传媒、娱乐、体育、咨询":
                code = "ma_varnum_has_industry_code10";
                break;
            case "金融业":
                code = "ma_varnum_has_industry_code11";
                break;
            case "文教":
                code = "ma_varnum_has_industry_code12";
                break;
            case "公共事业":
                code = "ma_varnum_has_industry_code13";
                break;
            case "卫生":
                code = "ma_varnum_has_industry_code14";
                break;
            case "家庭管理":
                code = "ma_varnum_has_industry_code15";
                break;
            case "新闻、出版、广告业":
                code = "ma_varnum_has_industry_code16";
                break;
            case "治安人员":
                code = "ma_varnum_has_industry_code17";
                break;
            case "军人":
                code = "ma_varnum_has_industry_code18";
                break;
            default:
                code = "ma_varnum_has_industry_code00";
                break;
        }
        return code;
    }
    // 20230222 配合调整收入选项
    public static Integer getIncomeFix2Code(String input) {
        Integer code = null;
        if (input != null) {
            switch (input) {
                case "小于1000元":
                case "1000-2000元":
                case "小于2000元":
                    code = 1000;
                    break;
                case "2000-4000元":
                    code = 3000;
                    break;
                case "4000-6000元":
                    code = 5000;
                    break;
                case "6000-8000元":
                case "6000-10000元":
                    code = 7000;
                    break;
                case "8000-15000元":
                case "10000-15000元":
                    code = 11500;
                    break;
                case "15000-20000元":
                case "20000元以上":
                case "15000-30000元":
                case "30000元以上":
                    code = 20000;
                    break;
                default:
                    code = null;
                    break;
            }
        }
        return code;
    }

    public static Integer getIncomeCode(String input) {
        Integer code = null;
        if (input != null) {
            switch (input) {
                case "小于1000元":
                    code = 500;
                    break;
                case "1000-2000元":
                    code = 1500;
                    break;
                case "2000-4000元":
                    code = 3000;
                    break;
                case "4000-6000元":
                    code = 5000;
                    break;
                case "6000-10000元":
                    code = 8000;
                    break;
                case "10000元以上":
                case "10000-15000元":
                case "15000-20000元":
                case "20000元以上":
                    code = 10000;
                    break;
                default:
                    code = null;
                    break;
            }
        }
        return code;
    }

    public static String getJobCode(String input) {
        String code = null;
        input = (input == null ? "null" : input);
        switch (input) {
            case "自由职业":
                code = "ma_varnum_job_code01";
                break;
            case "企业主":
                code = "ma_varnum_job_code02";
                break;
            case "工薪族":
                code = "ma_varnum_job_code03";
                break;
            case "事业单位公务员":
                code = "ma_varnum_job_code04";
                break;
            case "个体户":
                code = "ma_varnum_job_code05";
                break;
            default:
                code = "ma_varnum_job_code00";
                break;
        }
        return code;
    }

    public static String getMrgCode(String input) {
        String code = null;
        input = (input == null ? "null" : input);
        switch (input) {
            case "未婚":
                code = "ma_varnum_marridge_code01";
                break;
            case "已婚已育":
                code = "ma_varnum_marridge_code02";
                break;
            case "已婚未育":
                code = "ma_varnum_marridge_code03";
                break;
            case "离异":
                code = "ma_varnum_marridge_code04";
                break;
            case "丧偶":
                code = "ma_varnum_marridge_code05";
                break;
            default:
                code = "ma_varnum_marridge_code00";
                break;
        }
        return code;
    }

    public static String getUsageCode(String input) {
        String code = null;
        input = (input == null ? "null" : input);
        switch (input) {
            case "装修":
                code = "ma_varnum_usage_code01";
                break;
            case "其他":
                code = "ma_varnum_usage_code02";
                break;
            case "教育":
                code = "ma_varnum_usage_code03";
                break;
            case "租房":
                code = "ma_varnum_usage_code04";
                break;
            case "健康医疗":
                code = "ma_varnum_usage_code05";
                break;
            case "手机数码":
                code = "ma_varnum_usage_code06";
                break;
            case "家用电器":
                code = "ma_varnum_usage_code07";
                break;
            case "旅游":
                code = "ma_varnum_usage_code08";
                break;
            case "家具家居":
                code = "ma_varnum_usage_code09";
                break;
            case "婚庆":
                code = "ma_varnum_usage_code10";
                break;
            default:
                code = "ma_varnum_usage_code00";
                break;
        }
        return code;
    }

    public static void main(String[] args) {
        String input = null;

        System.out.println(getEduCode(input));
        System.out.println(getIncomeCode(input));
        System.out.println(getIdstryCode(input));
        System.out.println(getJobCode(input));
        System.out.println(getMrgCode(input));
        System.out.println(getUsageCode(input));
    }
}
